home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / E-G / Externals.cpt / Externals / card_10546.txt < prev    next >
Text File  |  1989-02-26  |  5KB  |  199 lines

  1. -- card: 10546 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 9951
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on openCard
  8.   push recent card
  9.   global menu1, menu2
  10.   hide message
  11.   put NewMenu("Beep","Once","Twice","(-","Boing/9") into menu1
  12.   put NewMenu("Visual","Effect 1","(Effect 2") into menu2
  13. end openCard
  14.  
  15. on closeCard
  16.   global menu1, menu2
  17.   put DeleteMenu(menu1) into menu1
  18.   put DeleteMenu(menu2) into menu2
  19. end closeCard
  20.  
  21. on idle
  22.   global menu1, menu2, lastTick
  23.   if (the ticks-lastTick)>120 then
  24.     put the ticks into lastTick
  25.     ShowMenu menu1
  26.     ShowMenu menu2
  27.   end if
  28.   pass idle
  29. end idle
  30.  
  31. on doMenu which
  32.   global menu1, menu2
  33.   if which is "Once" then
  34.     beep 1
  35.     CheckMenu menu1,1,true
  36.   else if which is "Twice" then
  37.     beep 1
  38.     wait 4
  39.     beep 1
  40.     CheckMenu menu1,2,true
  41.   else if which is "Boing" then
  42.     play "Boing"
  43.     CheckMenu menu1,4,true
  44.   else if which is "Effect 1" then
  45.     push card
  46.     visual effect dissolve to black
  47.     EnableMenu menu2,1,false
  48.     EnableMenu menu2,2,true
  49.     pop card
  50.   else if which is "Effect 2" then
  51.     push card
  52.     visual effect dissolve to white
  53.     pop card
  54.     EnableMenu menu2,1,true
  55.     EnableMenu menu2,2,false
  56.   else
  57.     pass doMenu
  58.   end if
  59. end doMenu
  60.  
  61.  
  62.  
  63. -- part 1 (button)
  64. -- low flags: 00
  65. -- high flags: A003
  66. -- rect: left=207 top=311 right=333 bottom=307
  67. -- title width / last selected line: 0
  68. -- icon id / first selected line: 0 / 0
  69. -- text alignment: 1
  70. -- font id: 0
  71. -- text size: 12
  72. -- style flags: 0
  73. -- line height: 16
  74. -- part name: Go Back
  75. ----- HyperTalk script -----
  76. on mouseUp
  77.   visual effect iris close
  78.   pop card
  79. end mouseUp
  80.  
  81.  
  82.  
  83. -- part 2 (field)
  84. -- low flags: 00
  85. -- high flags: 0000
  86. -- rect: left=161 top=33 right=56 bottom=375
  87. -- title width / last selected line: 0
  88. -- icon id / first selected line: 0 / 0
  89. -- text alignment: 1
  90. -- font id: 2
  91. -- text size: 18
  92. -- style flags: 0
  93. -- line height: 24
  94. -- part name: 
  95.  
  96.  
  97. -- part 23 (field)
  98. -- low flags: 81
  99. -- high flags: 2002
  100. -- rect: left=50 top=71 right=338 bottom=468
  101. -- title width / last selected line: 0
  102. -- icon id / first selected line: 0 / 0
  103. -- text alignment: 0
  104. -- font id: 3
  105. -- text size: 12
  106. -- style flags: 0
  107. -- line height: 16
  108. -- part name: info
  109.  
  110.  
  111. -- part 25 (field)
  112. -- low flags: 00
  113. -- high flags: 2004
  114. -- rect: left=146 top=119 right=219 bottom=376
  115. -- title width / last selected line: 0
  116. -- icon id / first selected line: 0 / 0
  117. -- text alignment: 0
  118. -- font id: 3
  119. -- text size: 12
  120. -- style flags: 0
  121. -- line height: 16
  122. -- part name: 
  123.  
  124.  
  125. -- part contents for card part 2
  126. ----- text -----
  127. Menu Demo
  128.  
  129. -- part contents for card part 3
  130. ----- text -----
  131. Montgomery,Alabama,AL
  132. Juneau,Alaska,
  133. Pheonix,Arizona,AZ
  134. Little Rock,Arkansas,
  135. Sacramento,California,CA
  136. Denver,Colorado,CO
  137. Hartford,Connecticut,CT
  138. Dover,Delaware,DE
  139. District of Columbia,Washington,DC
  140. Tallahassee,Florida,FL
  141. Atlanta,Georgia,GA
  142. Honolulu,Hawaii,HI
  143. Boise,Idaho,ID
  144. Springfield,Illinois,IL
  145. Indianapolis,Indiana,IN
  146. Des Moines,Iowa
  147. Topeka,Kansas,KS
  148. Frankfort,Kentucky,KY
  149. Baton Rouge,Lousiana,LA
  150. Augusta,Maine,ME
  151. Annapolis,Maryland,MD
  152. Boston,Massachusetts,MA
  153. Lansing,Michigan,MI
  154. St. Paul,Minnesota,MN
  155. Jackson,Mississippi,MS
  156. Jefferson City,Missouri,MO
  157. Helena,Montana,MT
  158. Lincoln,Nebraska,NE
  159. Carson City,Nevada,NV
  160. Concord,New Hampshire,NH
  161. Trenton,New Jersey,NJ
  162. Albany,New York,NY
  163. Raleigh,North Carolina,NC
  164. Bismarck,North Dakota,ND
  165. Columbus,Ohio,OH
  166. Oklahoma City,Oklahoma,OK
  167. Salem,Oregon,OR
  168. Harrisburg,Pennsylvania,PA
  169. Providence,Rhode Island,RI
  170. Columbia,South Carolina,SC
  171. Pierre,South Dakota,SD
  172. Nashville,Tennessee,TN
  173. Austin,Texas,TX
  174. Salt Lake City,Utah,UT
  175. Montpelier,Vermont,VT
  176. Richmond,Virginia,VA
  177. Olympia,Washington,WA
  178. Charleston,West Virginia,WV
  179. Madison,Wisconsin,WI
  180. Cheyene,Wyoming,WY
  181.  
  182. -- part contents for card part 23
  183. ----- text -----
  184. The syntax for the find command is:
  185.  
  186. position = FIND( target, source [ ,afterLine [ ,afterItem ] ] )
  187.  
  188. The target is any container through which you want to search.
  189. The source is any container, variable or string for which you ¬†¬†want to search. If the source string begins with the ‚Äú<‚Äù ¬†¬†character then the search is for any match of the source in ¬†¬†the target. (The ‚Äú<‚Äù character is not treated as part of the ¬†¬†string.) Otherwise, the search is for an exact match of the ¬†¬†source with an item in the target.
  190. The afterLine is an optional parameter specifying the line after ¬†¬†which to begin searching.
  191. The afterItem is an optional parameter specifying the item ¬†¬†after which to begin searching.
  192.  
  193.  
  194.  
  195.  
  196. -- part contents for card part 25
  197. ----- text -----
  198.  
  199. See the script of this card to find out how the "Beep" and "Visual" menus above are created and maintained.